Discontinuity edge overdraw

ABSTRACT

Reduction of aliasing artifacts along discontinuity edges of a rendered polygon mesh is achieved by overdrawing the edges as antialiased lines. The discontinuity edges are oriented consistently and blended as they approach silhouettes in the mesh to avoid popping at the edge, thereby achieving a temporal smoothness at the silhouettes. This temporal smoothness is balanced with a competing desire to maintain spatial sharpness by utilizing an asymmetric blending technique. To further improve results, the discontinuity edges can be sorted by depth prior to overdrawing them. These processes are effective at reducing the temporal artifact known as “crawling jaggies”.

TECHNICAL FIELD

[0001] This invention relates to computer graphics, and moreparticularly, to techniques for reducing aliasing along boundaries.

BACKGROUND

[0002] Aliasing is an important problem when rendering triangle or otherpolygonal meshes. Computer graphics has long dealt with the issue ofcreating discrete images without aliasing. For the hardware-acceleratedtriangle rendering pipeline, four forms of aliasing can be identified:

[0003] (1) Aliasing within triangle interiors (undersampling of shadingfunction). One such example is aliasing due to texture undersampling,which can be efficiently handled using mipmaps or higher-qualityanisotropic filtering. Other shading variations, like pinpoint specularhighlights, can exhibit high frequencies that are more difficult topredict and bandlimit.

[0004] (2) Aliasing at triangle edges (appearance discontinuities).

[0005] (3) Aliasing among triangles (subpixel-sized triangles, alsoknown as the “small object” problem). This problem is partially helpedby level-of-detail control. Robust solution requires adequatesupersampling or analytic antialiasing.

[0006] (4) Aliasing at triangle intersections (where one triangle passesthrough another). Static intersections can be preprocessed to yieldexplicit sharp edges using polyhedral CSG. Dynamic intersections aredifficult to antialias without supersampling.

[0007] With current graphics hardware, a simple technique for reducingaliasing is to supersample and filter the output image. On currentdisplays (desktop screens of approximately 1K×1K resolution), 2×2supersampling reduces but does not eliminate aliasing. Of course, afiner supersampling resolution further reduces aliasing but rapidlybecomes impractical.

[0008] One can implement 2×2 supersampling either by increasing theframe buffer resolution by a factor of four, or by accumulating foursubpixel-offset images of the same scene for each frame. Both approachesare costly. The first requires four times the frame buffer memory andfour times the fill-rate. The second requires four times the geometryprocessing, four times the fill-rate, and the addition of anaccumulation buffer. The impact is that fill-rate-bound renderingbecomes up to four times slower, and memory capacity is consumed thatcould otherwise be devoted to storing texture maps or caching geometry.

[0009] Much of the aliasing in current hardware rendering occurs alongdiscontinuity edges. Perhaps most objectionable are the “crawlingjaggies” that appear near discontinuity edges as a model moves. FIG. 1shows a magnified triangle edge 100 to illustrate such “crawlingjaggies”. The edge 100 is drawn on a grid 102 of pixels 104. Pixelstouching the edge 100 are assigned to the triangle edge, resulting in astair-stepped, jagged artifact 106. When the image moves, this jaggedartifact appears to crawl along the edge, making them highly noticeableto an observer.

[0010] Such artifacts are perceptible even at high display resolutionswhere static spatial aliasing is less obvious, and are observable evenwith 2×2 supersampling. Since discontinuity edges typically cover only asmall fraction of pixels, supersampling every pixel seems a brute-forcesolution.

[0011] Many general techniques to reduce aliasing have been used incomputer graphics, including uniform supersampling, adaptivesupersampling, analytic prefiltering, and stochastic sampling. Adaptivesupersampling attempts to focus computation on troublesome areas such asdiscontinuity edges. However, adaptive supersampling is difficult tomake robust and implement in hardware. Prefiltering approachesband-limit the continuous signal corresponding to a geometric primitive(such as a constant-colored polygon fragment), before actuallypoint-sampling it. They require expensive visibility determinations overareas rather than points. Stochastic sampling methods convert aliasingto less objectionable noise (rather than “crawling jaggies”), but stillrequire oversampling to acceptably reduce aliasing artifacts.

[0012] Coverage bitmask approaches supersample only coverage rather thanfull r, g, b, z samples. These are effective at reducing artifacts atdiscontinuity edges, but fail to eliminate aliasing at triangleintersections. Like traditional uniform supersampling, they arebrute-force solutions since a coverage bitmask must be computed andstored at every pixel (typically 16-32 extra bits). Moreover, theseschemes maintain a list of fragments projecting onto each pixel.

[0013] The OpenGL® application program interface (API) introduced by SGIoffers a “polygon antialiasing” feature, available on some high-endgraphics workstations, that renders polygons with antialiasedboundaries. It uses a special blending mode (source_alpha_saturate) andonly works when the polygons are sorted front-to-back. A similar featureis also exposed in the DirectX® API from Microsoft Corporation.

[0014] Another approach is to only antialias discontinuity edges. Onetechnique is to tag discontinuity edges and antialias them usingprefiltering convolution in a scanline renderer. Another techniqueinfers discontinuity edges in an aliased image as a post-process. Pixelsnear discontinuities are then modified to account for coverage of theinferred edges. This method gets confused at texture discontinuities,ignores temporal aliasing, and is likely too expensive to perform atinteractive rates.

[0015] More recently, silhouette clipping has been proposed as a way toreduce antialiasing along discontinuity edges. See, P. Sander, X. Gu, S.Gortler, H. Hoppe, and J. Snyder, “Silhouette Clipping”, SIGGRAPH 2000,pp. 327-334. With silhouette clipping, a coarse mesh is clipped to theexact silhouette of a detailed mesh using the stencil buffer. Bytransferring the stencil to the alpha buffer and redrawing silhouetteedges as antialiased lines, the external silhouette is antialiased.However, this solution is limited to external silhouettes, and is notmore generally applied to reducing aliasing at both internal andexternal silhouettes, as well as all discontinuity edges.

[0016] In another recent paper, the authors sketch a two-pass softwarerendering approach for antialiasing silhouette edges. See, F. Sauer, O.Masclef, Y. Robert, and P. Deltour, “Outcast: programming towards adesign aesthetic”, 1999 Game Developers Conference, pp. 811-827.Unfortunately, the second pass bloats foreground pixels near silhouettesby computing edge coverage at each pixel. The method handles onlysilhouettes and detects these by exhaustive search. The paper lacksdetails on how polygons are rasterized or how the two passes arecomposited. U.S. Pat. No. 6,005,580 to Donovan, which is entitled“Method and Apparatus for Performing Post-Process Antialiasing ofPolygon Edges”, describes a hardware approach that transfers the aliasedframe buffer contents into texture memory, and uses this texture tooverdraw antialiased edges in a second pass.

[0017] Another solution proposed by M. Wimmer in his downloadable viewer“View3DX software” is to overdraw antialiased lines. Unfortunately, thisapproach failed without software sorting of all polygons.

[0018] The documentation for Microsoft's DirectX® software also mentionsthe use of edge overdraw to achieve antialiasing. It explains thatredrawing every edge in a scene can work without introducing majorartifacts, but it can also be computationally expensive. In addition, itcan be difficult to determine which edges should be antialiased. Themost important edges to redraw are those between areas of very differentcolor (for example, silhouette edges) or boundaries between verydifferent materials. Antialiasing the edge between two polygons ofroughly the same color will have no effect, yet is still computationallyexpensive.

[0019] Building upon this knowledge base, the inventors have developedan edge overdraw approach that effectively reduces aliasing. They makethe approach practical by efficiently detecting and rendering just thediscontinuity edges, and introduce methods to maintain temporalsmoothness, spatial consistency, and spatial sharpness.

SUMMARY

[0020] Reduction of aliasing artifacts along discontinuity edges of arendered polygon mesh is achieved by overdrawing the edges asantialiased lines. The discontinuity edges are oriented consistently andblended as they approach silhouettes in the mesh to avoid popping at theedge, thereby achieving a temporal smoothness at the silhouettes. Thistemporal smoothness is balanced with a competing desire to maintainspatial sharpness by utilizing an asymmetric blending technique. Tofurther improve results, the discontinuity edges are sorted by depthprior to overdrawing them. These processes are effective at reducing thetemporal artifacts known as “crawling jaggies”.

[0021] In the described implementation, a process is divided into twophases: a preprocess phase and a runtime phase. During the preprocessphase, sharp edges in the polygon mesh that are view independent areidentified. Consistent orientation is then assigned to the sharp edges.Additionally, a data structure used to identify silhouette edges duringthe runtime phase is constructed.

[0022] During the runtime phase, the polygonal mesh is rendered andstored in a frame buffer. Silhouette edges with respect to the givenviewpoint are found using the data structure constructed during thepreprocess phase. The silhouette edges and sharp edges together form thediscontinuity edges. Shading is applied to the discontinuity edgesthrough an asymmetric blending technique that blends the discontinuityedges while minimizing blurriness at the edges. The discontinuity edgesare then optionally sorted according to their z-value to produce aback-to-front order. The edges are then rendered as antialiased lines inthe back-to-front order and written into the frame buffer, effectivelysuperimposing the antialiased lines on the original edges.

BRIEF DESCRIPTION OF THE DRAWINGS

[0023]FIG. 1 illustrates a conventional aliasing artifact, known as“crawling jaggies”, that occurs at an edge of a rendered polygon mesh.

[0024]FIG. 2 is a block diagram of an exemplary graphics computingdevice that implements a discontinuity edge overdraw process forreducing the crawling jaggies.

[0025]FIG. 3 illustrates three graphical images to help demonstrate theeffects of the discontinuity edge overdraw process.

[0026]FIG. 4 is a flow diagram of the discontinuity edge overdrawprocess implemented by the device of FIG. 2.

[0027]FIG. 5 illustrates a four-frame series of a moving graphical imageto demonstrate a “popping” effect.

[0028]FIG. 6 illustrates a four-frame series of the moving graphicalimage that is generated with additional shading to reduce the “popping”effect.

[0029]FIG. 7 illustrates a graphical image rendered using symmetricblending techniques at discontinuity edges to demonstrate a blurrinesseffect.

[0030]FIG. 8 illustrates the graphical image rendered using asymmetricblending techniques at discontinuity edges to reduce the blurrinesseffect.

[0031]FIG. 9 illustrates three instances of the same frame of agraphical image, where the first frame instance is produced without anyorientation of the discontinuity edges, the second frame instance isproduced with per-path orientation, and the third frame instance isproduced using global heuristic orientation.

DETAILED DESCRIPTION

[0032] Aliasing is an important problem when rendering polygon meshes,such as triangle meshes. A major component of aliasing occurs alongdiscontinuity edges such as silhouettes, creases, and materialboundaries. Reduction of aliasing artifacts along discontinuity edges ofa render polygon mesh is achieved by overdrawing the edges asantialiased lines. The result of edge overdraw differs from traditionalantialiasing methods like supersampling in that one side of eachdiscontinuity edge is “bloated” by a fraction of a pixel. As furtherrefinements, the discontinuity edges are oriented consistently andblended as they approach silhouettes in the mesh to avoid popping at theedge, thereby achieving a temporal smoothness at the silhouettes.Unfortunately, edge blending may produce blurriness. Thus, to balancetemporal smoothness with spatial sharpness, an asymmetric blendingtechnique is employed. To further improve results, the discontinuityedges are sorted by depth prior to overdrawing them. These processeseffectively reduce the “crawling jaggies” artifact.

[0033] Graphics Computing Device

[0034]FIG. 2 shows an exemplary graphics computing device 200 formed asa personal computer implemented with a graphics card. The computingdevice 200 includes a central processing unit (CPU) 202, a system memory204, a graphics processing unit (GPU) 206, a frame buffer 208 that formsthe video memory, and a display 210 (e.g., flat panel display, CRTmonitor, etc.). The system memory 204 is implemented as a variety of oneor more types of volatile memory (e.g., RAM, DRAM, etc.) and nonvolatilememory (e.g., ROM, Flash, EEPROM, disk, CD-ROM, etc.). The graphicsprocessing unit 206 and frame buffer 208 are typically located on thegraphics card, as illustrated by the dashed line separating cardcomponents from computer components.

[0035] The CPU 202, system memory 204, graphics processing unit 206,frame buffer 208, and display 210 are connected via a set of one or morebuses 212, 214, 216, and 218. The buses may be integrated as one largesystem bus, or implemented as separate buses. Separate buses areillustrated to pictorially represent a graphics rendering pipeline fromthe CPU 202 to the display 210. The buses may be any of a variety of busarchitectures including a memory bus or memory controller, a peripheralbus, an accelerated graphics port, and a processor or local bus usingany of a variety of bus architectures. By way of example, sucharchitectures can include an Industry Standard Architecture (ISA) bus, aMicro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, aVideo Electronics Standards Association (VESA) local bus, and aPeripheral Component Interconnects (PCI) bus also known as a Mezzaninebus.

[0036] A polygon mesh 220 is stored in system memory 204, oralternatively in frame buffer 208 as illustrated by the dashed lines.This mesh 220 holds a collection of polygons that are used to generategraphic images. In one implementation, the polygon mesh 220 is composedof a collection of triangles.

[0037] One or more functional modules are illustrated within variouscomponents to demonstrate the functions performed by the graphicscomputing device 200, as well as the exemplary components that performsuch functions. The CPU 202 has a discontinuity edge (DE) detector 230that is formed in hardware or software to detect edges in a polygon mesh220. The discontinuity edges are categorized into two edge types: (1)“silhouette edges”, which limit the extent of the projected surface, and(2) “sharp edges”, which mark shading discontinuities due to materialboundaries or discontinuities in material attributes like normals andcolors.

[0038] A silhouette tree structure 232 is shown stored in system memory204. The silhouette tree 232 is a data structure that is used by the DEdetector 230 to identify silhouette edges at each frame for a particularviewpoint. The silhouette search structure 232 stores all edges so thatthose that are silhouettes with respect to a given view may be foundquickly. Once found, the extracted silhouette edges are collected andstored together with the sharp edges in a discontinuity edge (DE) list234. The DE list can either be unsorted or sorted (as explained below inmore detail.

[0039] The CPU 202 also includes an edge sorter 236 and a shade/blendmodule 238. The edge sorter 236 performs optional edge sorting tasks tosort the edges in the DE list 234 according to which edges are visible.The shade/blend module 238 shades and/or blends the edges. The DEdetector 230, edge sorter 236, and shade/blend module 238 may beimplemented in hardware within the CPU 202, or as software that isstored in system memory and executed on the CPU 202.

[0040] The GPU 206 includes a rendering module 240 and an overdrawingmodule 242, which can be implemented in hardware or a combination ofhardware and software. The rendering module 240 renders the trianglesfrom the mesh 232 and places the rendered images in the frame buffer208.

[0041]FIG. 3 shows a series 300 of three images references as numbers302, 304, and 306. The first image 302 illustrates the original renderedimage with antialiasing along certain edges.

[0042] The overdrawing module 242 overdraws the discontinuity edgesdetected by the DE detector 230 as antialiased lines. The overdrawingmodule 242 exploits existing hardware capable of rendering antialiasedlines, which is well-known in the art of computer graphics. Theoverdrawn edges are illustrated as image 304 in FIG. 3. The z-buffer isused to resolve visibility between the mesh triangles and the overdrawnedges. The number of discontinuity edges is typically much smaller thanthe number of triangles or pixels, so the overall frame time overhead issmall.

[0043] The overdrawn edges are effectively superimposed on the renderedimage in the frame buffer 208 to significantly reduce the “crawlingjaggies” caused by the aliasing along the edges of the rendered mesh.The final result is illustrated as image 306 in FIG. 3. Notice thereduction in jaggies from the original image 302, thereby improvingrendering quality. In addition to reducing aliasing along the edges, theshade/blend module 238 helps maintain temporal smoothness, spatialconsistency, and spatial sharpness. The rendered image is then scannedout to display 210.

[0044] Overdraw Method

[0045]FIG. 4 shows a process 400 for rendering polygonal meshes in a waythat reduces aliasing along edges. The process 400 is implemented by thegraphics computing device 200 and where appropriate, will be describedwith reference to various exemplary components that perform the variousacts. The acts shown in the process can be implemented in hardware,software, or a combination of hardware and software.

[0046] The process 400 is divided into to phases: a preprocess phase anda runtime phase. The preprocess phase is performed at the CPU 202 inpreparation to the runtime phase. The blocks in FIG. 4 are separated bya dashed line to differentiate between preprocess operations and runtimeoperations.

[0047] Preprocess Phase

[0048] At block 402, the CPU 202 begins the preprocess phase byidentifying sharp edges (SE). Recall that discontinuity edges are aunion of sharp edges (which mark shading discontinuities) and silhouetteedges (which limit the extent of the projected surface). Because sharpedges demarcate shading discontinuities, this set of edges is static andhence view independent. Therefore, sharp edges can be collected duringthe preprocess phase, rather than during runtime, and are subsequentlyoverdrawn at every frame. The sharp edges are stored in the DE list 234.Fortunately, the number of sharp edges is typically a small fraction ofthe total number of edges. Consistent orientations are then assigned tothe sharp edges.

[0049] Silhouette edges, in contrast, are based on the viewpoint. Anedge is a silhouette edge if one of its adjacent faces is frontfacingand the other backfacing. For many meshes, the average number ofsilhouette edges per view is only o({square root}{square root over(n)}), where n is the number of mesh edges. So, typically only a smallfraction of mesh edges will be overdrawn as silhouette edges.

[0050] Collecting the silhouette edges can be done in a brute-forcemanner by checking all mesh edges in o(n) time. To accelerate thisprocess, the CPU-based DE detector 230 employs a fast silhouetteextraction algorithm whose average running time is proportional to thenumber of output silhouette edges. An exemplary algorithm is describedby Sander, et al., in “Silhouette Clipping”, SIGGRAPH 2000, pp. 327-334.

[0051] At block 404, the CPU 202 constructs the silhouette treestructure that is used by the algorithm as a search hierarchy in whichnodes represent clusters of mesh edges. The silhouette tree 232 is adata structure stored in system memory 204. Then, for a given viewpointat runtime, the DE detector 230 traverses the hierarchy and is able toquickly skip entire subtrees that contain no silhouette edges.

[0052] Runtime Phase

[0053] At block 406, the rendering module 240 of the graphics processingunit 206 renders an image as a triangle mesh (or other polygon mesh).For efficiency, it is specified as a display list of triangle strips.The z-buffer is used to resolve occlusion, and is saved for use duringedge overdraw. The image is placed in the frame buffer 208.

[0054] At block 408, the silhouette edge detector 230 of the CPU 202identifies e the silhouettes for a particular view or scene using thesilhouette search structure 232. Found silhouettes are stored in the DElist 234. For a closed object, silhouette edges that are concave (havingan outer dihedral angle ≦180 degrees) are always occluded. Therefore,such concave edges need not be entered into the search structure 232.This typically reduces the number of edges in the structure by 40%.Furthermore, since sharp edges are typically overdrawn, they too areomitted, resulting in an additional reduction of about 10%.

[0055] At block 410, the discontinuity edge detector 230 produces a setof discontinuity edges as a union of the sharp edges identified inpreprocessing and the silhouettes identified during runtime, which areboth stored in the DE list 234.

[0056] Occasionally, artifacts are produced when silhouettes lie infront of other discontinuity paths. These artifacts can be removed bysorting the edges in back-to-front order prior to rendering them duringthe subsequent overdraw operation. At block 412, the edge sorter 236 maybe used to sort the discontinuity edges in the DE list 234 according tovisibility.

[0057] In one implementation, the edge sorter uses the z-buffer valuesthat determine the depth dimension of the edges. The edges are sortedaccording to the distance from the viewpoint to the edge midpoint.Although this midpoint depth-sort heuristic occasionally gives anincorrect sort, artifacts are rare and comprise only a few isolatedpixels. By comparison, traditional back-to-front polygon renderingrequires correct occlusion-based ordering since mistakes there are muchmore evident.

[0058] Of all sharp edges, only the sharp edges on or near thesilhouette occlude other discontinuity edges. An edge is declared to benear the silhouette if it has β<0.1 or β>0.9, where β is a blendparameter defined below. Thus, one optimization is to include only thesesharp edges in the sort along with the other silhouette edges. Theremaining sharp edges are simply drawn first.

[0059] The sorting operation incurs some computational cost, and henceis optional. It is beneficial when there are many discontinuity edgecrossings.

[0060] At block 414, the shade/blend module 238 of the CPU 202 shadesand/or blends the discontinuity edges. To shade each discontinuity edge,the module 238 uses shading parameters (e.g. normals, colors, textures,texture coordinates) taken from the edge's neighboring faces, denoted asthe left and right faces. How the shading parameters of the left andright face are combined depends on the category of the discontinuityedge.

[0061] First, consider silhouette edges. The case of a non-sharpsilhouette edge is relatively straight forward since the shadingparameters of the two adjacent faces agree. At a sharp silhouette edge,the shading parameters of the two faces are different, and the edgeshould be shaded using the parameters of the frontfacing adjacent face.Note that depending on object orientation, a given sharp edge may appearon the silhouette with either the left face frontfacing, or the rightface frontfacing.

[0062] The troublesome case is that of a sharp edge not on thesilhouette. To maintain temporal continuity, the edge should somehowsmoothly transition to the shading parameters of either the left face orthe right face as it approaches the silhouette. Otherwise, abruptlyswitching the shading parameters from one face to the other would resultin a “popping” artifact.

[0063]FIG. 5 shows a four-frame series consisting of four frames500(1)-500(4) that are drawn without the benefit of edge blending todemonstrate the “popping” effect. Notice that as the sharp edgeapproaches the silhouette with the wrong shading from frame 500(3) toframe 500(4), a popping artifact is produced as the darker top lineinstantly disappears.

[0064] To solve this problem, for intermediate views where both adjacentfaces are frontfacing, the shade/blend module 238 shades the edge as acombination of the two faces' shading states. A blend parameters iscomputed based on the inner products of the viewing direction with thetwo adjacent face normals:

[0065] V=eye−edge.midpoint

[0066] dotL=V·edge.leftFace.faceNormal

[0067] dotR=V·edge.rightFace.faceNormal

[0068] β=dotR/(dotL+dotR).

[0069] Shading is then blended using the following relationship:

(1−β)leftShading+(β)rightShading.

[0070] To achieve this blending, two alternate schemes may be used:“blended-draw” and “double-draw”. The edge blended-draw scheme rendersthe edge once, as a blended combination of the two shading functions.Ideally, the blending is performed with post-shaded color values. Fortexture-mapped meshes, this is achieved using hardware multitexturing toblend the two adjacent textures. For Gouraud-shaded surfaces, currenthardware does not permit blending of post-shaded results (withoutresorting to shading on the host CPU). Future hardware supportingprogrammable shading will permit post-shaded blending. For now, theshading attributes (e.g. normals and colors) are interpolated prior tohardware shading. One drawback is that blending of normals can causefalse highlights on sharp crease edges.

[0071] The edge double-draw scheme renders the antialiased edge twice,once using the shading function of the left face, and once using that ofthe right face. An opacity value (alpha) is specified for compositingeach edge “over” the frame buffer. At least one of the edge renderingsmust use alpha=to prevent the aliased background pixels from showingthrough. Moreover, the backface shading must be attenuated to zero asthe edge approaches the silhouette, to avoid popping. If this backfaceshading edge is the one drawn with alpha=1, there is no way to eliminateits contribution by rendering the second antialiased line over it (dueto the antialiased line's partial coverage). Accordingly, a simpleorder-switching algorithm is used. Specifically, if β<0.5, we firstrender with left face shading and alpha=1, followed by right faceshading and alpha=β. Otherwise we first render with right face shadingand alpha=1 followed by left face shading with alpha=1−β. Although thisresults in a slight discontinuity at the β=0.5 transition, it is notperceptible in practice.

[0072] For blending, the edge double-draw scheme is preferred for itsimplementation simplicity. Also, it does not require multitexturing anddoes not exhibit false highlights due to pre-shaded blending.

[0073]FIG. 6 shows the same four-frame series as that of FIG. 5, butwith the image in each frame being drawn using the double-draw scheme.Notice the smoother transition from frame-to-frame in comparison tonon-blended images of FIG. 5.

[0074] Although blending is beneficial to avoid temporal popping, ittends to blur the discontinuity edge because the shading of the blendededge agrees with neither of the adjacent faces. To compromise betweenthe competing goals of temporal smoothness and spatial sharpness, ahybrid approach uses the parameters from a single face (the left face)as much as possible, while still avoiding objectionable POPS.

[0075] To improve the sharpness at the edge, the blend parameter β ismapped through an asymmetric transfer function:$\beta^{\prime} = \left\{ \begin{matrix}0 & {,{{{if}\quad \beta} \leq \tau}} \\{\left( {\beta - \tau} \right)\text{/}\left( {1 - \tau} \right)} & {,{otherwise},}\end{matrix} \right.$

[0076] The edges are blended using the resulting β═. We find that with τset to 0.9, edge transition are still temporally smooth, but thefraction of blended sharp edges drops from about 30% to 2% on average.In addition to restoring edge sharpness and saving blending operations,asymmetric blending allows most of the edge geometry to remain static,possibly cached on the graphics card. This may be exploited by firstrendering all sharp edges as a display list and then the few blendededges.

[0077]FIGS. 7 and 8 show the same image, but FIG. 7 illustrates theimage with symmetric blending whereas FIG. 8 shows the image withasymmetric blending. With asymmetric blending (FIG. 8), a non-silhouettesharp edge is usually drawn using the shading parameters of the leftface. This has the drawback of shifting the proper material boundary byhalf a pixel. However, this is less objectionable than the extrasoftening or blurring that occurs when using symmetric blending.

[0078] When referring earlier to the left/right faces of an edge, anedge orientation is assumed. If a shading discontinuity consists ofseveral sharp edges along a path and the orientation of each edge in thepath is selected independently, then an asymmetric blending bias resultsin staggered-looking discontinuities. The solution to reducing thesediscontinuities is to orient discontinuity edges consistently using anorientation algorithm. Orientation of sharp edges may be performedduring the preprocessing phase prior to runtime.

[0079]FIG. 9 shows three instances 900(1)-900(3) of the same frame toillustrate different orientation approaches. The first instance 900(1)illustrates the case without orientation of the discontinuity edges todemonstrate the staggered-looking discontinuities.

[0080] Using a per-path orientation approach, sharp edges are firstconcatenated together into sharp paths. Two adjacent sharp edges areplaced in the same path if their shared vertex has no other adjacentsharp edges. For each path, we assign an orientation to one edge, andthen locally propagate this orientation along the entire path. However,if each sharp path is oriented independently, some regular structuresappear non-uniform. For example, the second frame instance 900(2) inFIG. 9 shows that some patches might appear larger than others.

[0081] This is resolved using a global heuristic that begins by pickingtwo arbitrary orthogonal vectors, such as g₁=(2,5,1) and g₂=(2,1,−9).For each sharp path, a representative edge is determined as the onewhose midpoint is farthest along the vector g₁. The orientation of thisedge is then assigned based on the sign of the dot product between theedge vector and the vector g₂. Given this first edge orientation, theprocess locally propagates along the sharp path as before. The result isshown as the third frame instance 900(3) in FIG. 9.

[0082] With reference again to FIG. 4, at block 416, the overdrawingmodule 242 of the graphics processing unit 206 overdraws thediscontinuity edges with antialiasing lines. In one implementation, onceshading parameters are determined, the edges are once again renderedinto the frame buffer 208 as antialiased lines. Alpha blending isconfigured so that the lines are drawn using an “over” operation. Thez-buffer test is enabled to avoid drawing occluded edges. The z-bufferwrite is disabled so that chains of antialiased edges do not have gapsat the shared endpoints between individual edges.

[0083] The rendering process 400 may be implemented in software that,when executed, directs the graphics computing device to perform thevarious functions. The following pseudo code represents an exemplaryimplementation of the process 400. Preprocess Collect sharp edges Sharpin scene; Assign consistent orientations to Sharp; Construct silhouetteextraction tree (excluding sharp & concave); Runtime (given viewpointfor each frame) Render scene; S = Ø; for edge e in Sharp d_(left) =dot(e.f_(left).normal , e.midpoint - viewpoint); d_(right) =dot(e.f_(right).normal , e.midpoint - viewpoint); if d_(left) < 0 andd_(right) < 0 then continue; // backfacing e.β = d_(right) / (d_(left) +d_(right)); if 0.1 < e.β < 0.9 then Render e with α = 1.0 usinge.f_(left) shading; else S = S U {e}; Extract silhouette edges Sil givenviewpoint; S = S U Sil; Sort S in back-to-front order; for edge e in Sif e ε Sil then Render e with α = 1.0 using e.f_(front) shading; else ife.β < 0.9 then Render e with α = 1.0 using e.f_(left) shading; else e.β'= (e.β - 0.9) / (1.0 - 0.9); if e.β' < 0.5 then Render e with α = 1.0using e.f_(left) shading; Render e with α = e.β' using e.f_(right)shading; else Render e with α = 1.0 using e.f_(right) shading; Render ewith α = 1.0 - e.β' using e.f_(left) shading;

[0084] Experimental Results

[0085] The graphics rendering process described above was implemented,tested, and observed by the inventors. The software was written usingOpenGL. It was implemented and tested on a Pentium III 800 MHz PC withan NVIDIA GeForce2 graphics card. The inventors further verified thatthe process works on an SGI Octane graphics card.

[0086] The inventors used the OpenGL® API function glEnable(GL_POLYGON_OFFSET_FILL) to perturb z-buffer values of triangles behindthose of lines. This was done so that antialiased lines pass thez-buffer test to cover the crawling jaggies. For edges adjacent totriangles with high depth slope, the inventors 1. observed remainingaliasing artifacts, suggesting that the function glPolygonoffset ( )feature is not pushing the triangles back sufficiently. The presence ofthese artifacts varies with the particular graphics hardware.

[0087] For efficiency, GL_BLEND is enabled for rendering lines. Thelines are rendered using the default glLinewidth (1.0 f).

[0088] When edge sorting is enabled, qsort ( )is employed. A fasteralgorithm, like bucket sort, could further improve the timing resultswhen rendering high-resolution models.

[0089] The system was tested on six models. The preprocessing bottleneckis the creation of the silhouette tree, which is currently unoptimizedand can take several minutes on large models. Collecting the sharp edgesand assigning them consistent orientations takes only a few seconds.

[0090] Runtime results are shown in Table 1. Note that the extractedsilhouette edges do not include silhouette edges that are sharp orconcave. Rendered edges excludes backfacing sharp edges. The shipexample has a higher performance overhead because it is geometry-boundand has a high number of discontinuity edges. TABLE 1 Model man planestoneh dino ship Faces 1,586 8,000 1,380 43,866 85,068 Edges 2,37912,000 2,070 65,799 127,602 Sharp edges 354 2,085 1,250 900 19,769 Edgestatistics averaged over 100 viewpoints Extracted sil. 94 393 22 3657,122 edges Rendered 373 1,727 952 1,894 21,980 edges Sorted edges 3091,212 661 1,240 16,448 Blended 6 23 10 23 266 edges Rendering time perframe (in milliseconds) No edge 7.2 9.8 9.6 18.9 40.1 overdraw Unsorted7.7 10.3 10.7 20.0 88.4 edge overdraw Sorted edge 7.7 10.8 10.7 23.3121.2 overdraw

[0091] Conclusion

[0092] Described above is an edge overdraw technique that reducesdiscontinuity edge artifacts. For typical models having a smallproportion of discontinuity edges, edge overdraw can be performed withlittle added cost. While the method is designed for spatialantialiasing, it reduces the “crawling jaggies” artifact.

[0093] The process generalizes to the case of meshes with boundaries. Aboundary edge can be thought of as a smooth edge with an outer dihedralangle of 360 degrees. Thus, it is reported as a silhouette edge for allviewpoints. The edge is shaded using the attributes of its one adjacentface. With surface boundaries, the mesh interior may become visible, sosome of the optimizations may be disabled. For instance, concave edgesare no longer omitted from the silhouette search structure and sharpedges are drawn even if they are backfacing.

[0094] Edge overdraw extends triangles by a fraction of a pixel alongdiscontinuities. At silhouette edges, this essentially enlarges theforeground object slightly at the expense of the background. This isdone since the frame buffer lacks information about what lies behind theforeground object at partially covered pixels drawn in the foreground.

[0095] For a scene with many objects, edges can be overdrawn after allobjects are rendered. Alternatively, edge overdraw can be applied afterthe rendering of each object. In that case, the objects are rendered inback-to-front order if one desires correct behavior at objectsilhouettes.

[0096] Although the invention has been described in language specific tostructural features and/or methodological acts, it is to be understoodthat the invention defined in the appended claims is not necessarilylimited to the specific features or acts described. Rather, the specificfeatures and acts are disclosed as exemplary forms of implementing theclaimed invention.

1. A method comprising: rendering a polygonal mesh to produce acomputer-generated image, the image exhibiting aliasing at itsdiscontinuity edges; and overdrawing the discontinuity edges asantialiased lines to reduce the aliasing.
 2. A method as recited inclaim 1, wherein the polygon mesh comprises a set of triangles.
 3. Amethod as recited in claim 1, wherein the image is stored in memoryafter rendering, and the overdrawing comprises rendering thediscontinuity edges as antialiased lines in the memory to reduce thealiasing at the discontinuity edges.
 4. A method as recited in claim 1,further comprising identifying the discontinuity edges as a collectionof silhouettes and sharp edges.
 5. A method as recited in claim 1,further comprising: identifying sharp edges prior to said rendering; andfinding silhouette edges during runtime, the discontinuity edges being aunion of the sharp edges and the silhouette edges.
 6. A method asrecited in claim 1, further comprising shading the discontinuity edges.7. A method as recited in claim 1, further comprising blending selecteddiscontinuity edges.
 8. A method as recited in claim 1, furthercomprising orienting the discontinuity edges in a consistent manner. 9.A method as recited in claim 1, further comprising asymmetricallyblending selected discontinuity edges.
 10. A method as recited in claim1, further comprising sorting the discontinuity edges prior to saidoverdrawing.
 11. One or more computer-readable media comprisingcomputer-executable instructions that, when executed, perform the methodas recited in claim
 1. 12. A method comprising: determiningdiscontinuity edges of a polygon mesh; and overdrawing the discontinuityedges as antialiased lines.
 13. A method as recited in claim 12, whereinsaid determining comprises identifying sharp edges and silhouettes. 14.A method as recited in claim 12, wherein said determining comprises:identifying sharp edges during a preprocess prior to rendering thepolygon mesh; and finding silhouette edges during runtime afterrendering the polygon mesh.
 15. A method as recited in claim 12, furthercomprising shading the discontinuity edges.
 16. A method as recited inclaim 12, further comprising blending selected discontinuity edges. 17.A method as recited in claim 12, further comprising asymmetricallyblending selected discontinuity edges.
 18. A method as recited in claim12, further comprising orienting the discontinuity edges in a consistentmanner.
 19. A method as recited in claim 12, further comprising sortingthe discontinuity edges prior to said overdrawing.
 20. One or morecomputer-readable media comprising computer-executable instructionsthat, when executed, perform the method as recited in claim
 12. 21. In aprocess for rendering computer-generated graphics, a method comprising:constructing a data structure prior to rendering a polygon mesh; andfinding silhouette edges in the polygon mesh during runtime using thedata structure; and omitting concave silhouette edges from the datastructure.
 22. A method as recited in claim 21, further comprisingoverdrawing the silhouette edges as antialiased lines.
 23. A method asrecited in claim 21, further comprising shading the silhouette edges.24. A method as recited in claim 21, further comprising blendingselected silhouette edges.
 25. A method as recited in claim 21, furthercomprising asymmetrically blending selected silhouette edges.
 26. Amethod as recited in claim 21, further comprising sorting the silhouetteedges.
 27. One or more computer-readable media comprising computer-sexecutable instructions that, when executed, perform the method asrecited in claim
 2. 28. In a process for rendering computer-generatedgraphics, a method comprising: identifying sharp edges prior to runtime;constructing a data structure prior to rendering a polygon mesh; findingsilhouette edges in the polygon mesh during runtime using the datastructure; and collecting the sharp edges and the silhouette edges in alist to form discontinuity edges of the polygon mesh.
 29. A method asrecited in claim 28, further comprising shading the discontinuity edges.30. A method as recited in claim 28, further comprising blendingselected discontinuity edges.
 31. A method as recited in claim 28,further comprising asymmetrically blending selected discontinuity edges.32. A method as recited in claim 28, further comprising sorting thediscontinuity edges.
 33. One or more computer-readable media comprisingcomputer-executable instructions that, when executed, perform the methodas recited in claim
 28. 34. A method comprising: rendering a polygonalmesh; determining discontinuity edges of the polygon mesh; sorting thediscontinuity edges according to visibility; and overdrawing thediscontinuity edges in an order resulting from said sorting.
 35. Amethod as recited in claim 34, wherein said determining comprises:identifying sharp edges prior to said rendering; and finding silhouetteedges during runtime, the discontinuity edges being a union of the sharpedges and the silhouette edges.
 36. A method as recited in claim 34,wherein said sorting comprises sorting the discontinuity edges accordingto depth.
 37. A method as recited in claim 34, wherein said overdrawingcomprises overdrawing the discontinuity edges as antialiased lines. 38.A method as recited in claim 34, further comprising shading thediscontinuity edges.
 39. A method as recited in claim 34, furthercomprising blending selected discontinuity edges.
 40. A method asrecited in claim 34, further comprising asymmetrically blending selecteddiscontinuity edges.
 41. A method as recited in claim 34, furthercomprising orienting the discontinuity edges in a consistent manner. 42.One or more computer-readable media comprising computer-executableinstructions that, when executed, perform the method as recited in claim21.
 43. A method comprising: rendering a polygonal mesh; identifying oneor more silhouette edges of the polygon mesh for a given viewpoint; andoverdrawing the silhouette edges as antialiased lines.
 44. A method asrecited in claim 43, wherein the identifying comprises: constructing adata structure prior to rendering the image; finding the silhouetteedges during runtime using the data structure; and storing thesilhouette edges in an output list.
 45. A method as recited in claim 43,further comprising shading the silhouette edges.
 46. A method as recitedin claim 43, further comprising sorting the silhouette edges prior tosaid overdrawing.
 47. One or more computer-readable media comprisingcomputer-executable instructions that, when executed, perform the methodas recited in claim
 43. 48. A method comprising: A. during a preprocessphase, performing the following: identifying sharp edges present in apolygon mesh used to generate a graphical image; constructing a datastructure to store possible silhouette edges identified during asubsequent runtime phase; B. during the runtime phase, performing thefollowing: rendering the polygonal mesh to produce a rendered image;identifying silhouette edges that occur from a given viewpoint of therendered image using the data structure, the silhouette edges togetherwith the sharp edges forming a set of discontinuity edges; shading thediscontinuity edges; sorting the discontinuity edges; and overdrawingthe discontinuity edges as antialiased lines.
 49. A method as recited inclaim 48, wherein the sorting comprises sorting the discontinuity edgesaccording to depth.
 50. A method as recited in claim 48, wherein theshading comprises asymmetrically shading the discontinuity edges.
 51. Amethod as recited in claim 48, wherein the shading comprises applyingblending processes that balance temporal smoothness and spatialsharpness.
 52. A method as recited in claim 48, wherein the shadingcomprises orienting the discontinuity edges in a consistent manner. 53.A graphics computing device comprising: a memory to store a polygonmesh; and a processing unit to render the polygon mesh, the processingunit being further configured to overdraw discontinuity edges of thepolygon mesh as antialiased lines.
 54. A graphics computing device asrecited in claim 53, wherein the polygon mesh comprises a set oftriangles.
 55. A graphics computing device as recited in claim 53,wherein the processing unit is configured to detect the discontinuityedges as a collection of sharp edges and silhouettes.
 56. A graphicscomputing device as recited in claim 53, wherein the processing unitcomprises: a central processing unit configured to detect thediscontinuity edges; and a graphics processing unit configured to renderthe polygon mesh and to overdraw the discontinuity edges.
 57. A graphicscomputing device as recited in claim 53, further comprising a framebuffer to store the rendered mesh, the processing unit being configuredto render the discontinuity edges as antialiased lines in the framebuffer.
 58. A graphics computing device as recited in claim 53, whereinthe processing unit is further configured to shade the discontinuityedges.
 59. A graphics computing device as recited in claim 53, whereinthe processing unit is further configured to blend selecteddiscontinuity edges.
 60. A graphics computing device as recited in claim53, wherein the 23 processing unit is further configured to orient thediscontinuity edges in a consistent manner.
 61. A graphics computingdevice as recited in claim 53, wherein the processing unit is furtherconfigured to asymmetrically blend selected discontinuity edges.
 62. Agraphics computing device as recited in claim 53, wherein the processingunit is further configured to sort the discontinuity edges prior tooverdrawing them.
 63. A graphics processing system comprising: arenderer configured to render a polygon mesh; a discontinuity edgedetector configured to detect discontinuity edges in the polygon mesh;and an overdrawer configured to overdraw the discontinuity edges asantialiased lines to reduce the aliasing.
 64. A graphics processingsystem as recited in claim 63 further comprising: a data structure; andthe discontinuity edge detector being configured to find silhouetteedges in the polygon mesh using the data structure.
 65. A graphicsprocessing system as recited in claim 63 wherein the discontinuity edgedetector is further configured to identify sharp edges of the polygonmesh prior to rendering the polygon mesh.
 66. A graphics processingsystem as recited in claim 63 further comprising an edge sorter to sortthe discontinuity edges according to depth.
 67. A graphics processingsystem as recited in claim 63 further comprising a shading module toshade the discontinuity edges using asymmetric blending.
 68. A graphicscomputing device comprising the graphics processing system as recited inclaim
 63. 69. One or more computer-readable media comprisingcomputer-executable instructions that, when executed, direct a graphicscomputing device to: render a polygonal mesh; detect discontinuity edgesin the polygon mesh; and overdraw the discontinuity edges as antialiasedlines to reduce the aliasing.
 70. One or more computer-readable media asrecited in claim 69, further comprising computer-executable instructionsthat, when executed, direct the graphics computing device to: identifysharp edges prior to rendering the polygon mesh; and find silhouetteedges after rendering the polygon mesh, the discontinuity edges being aunion of the sharp edges and the silhouette edges.
 71. One or morecomputer-readable media as recited in claim 69, further comprisingcomputer-executable instructions that, when executed, direct thegraphics computing device to shade the discontinuity edges.
 72. One ormore computer-readable media as recited in claim 69, further comprisingcomputer-executable instructions that, when executed, direct thegraphics computing device to sort the discontinuity edges according todepth.
 73. One or more computer-readable media as recited in claim 69,further comprising computer-executable instructions that, when executed,direct the graphics computing device to: orient the discontinuity edgesin a consistent manner; and blend the discontinuity edges usingasymmetric blending.
 74. A system comprising: means for identifyingsharp edges present in a polygon mesh; means for rendering the polygonalmesh to produce a rendered image; means for identifying silhouette edgesthat occur from at least one viewpoint of the rendered image; means forshading the discontinuity edges; means for sorting the discontinuityedges; and means for overdrawing the discontinuity edges as antialiasedlines.